<template>
  <div class="sidebar">
    <div class="menu-item" v-for="item in menuItems" :key="item.path">
      <router-link :to="item.path" exact>
        {{ item.title }}
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      menuItems: [
        { title: '首页', path: '/list' },
        { title: '关于我们', path: '/about' },
        { title: '产品中心', path: '/products' },
        { title: '联系我们', path: '/contact' }
      ]
    }
  }
}
</script>

<style scoped>
.sidebar {
  width: 200px;
  background-color: #f5f5f5;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
}

.menu-item {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.menu-item a {
  text-decoration: none;
  color: #333;
  display: block;
}

.menu-item a.router-link-exact-active {
  color: #42b983;
  font-weight: bold;
}
</style>
